import getCookie from 'utils/getCookie'

const globals = {
  '__DEV__': true,
  '__BACKEND_URL__': '',
  '__PACKAGE_SERVER__': '',
  '__WS_URL__': '',
  '__RUN_MODE__': 'mode'
}

const config = {
  projectName: '项目',
  spaceKey: '',
  requiredExtensions: [],
  baseURL: getCookie('BACKEND_URL') || globals.__BACKEND_URL__ || window.location.origin,
  packageServer: getCookie('PACKAGE_SERVER') || globals.__PACKAGE_SERVER__ || window.location.origin,
  wsURL: getCookie('WS_URL') || globals.__WS_URL__ || globals.__BACKEND_URL__ || window.location.origin,
  runMode: globals.__RUN_MODE__,
  isPlatform: Boolean(globals.__RUN_MODE__)
}

export default config
